package client.structural.bridge.eg_1;

import uml.structural.bridge.eg_1.BigBrush;
import uml.structural.bridge.eg_1.BlackColor;
import uml.structural.bridge.eg_1.Brush;
import uml.structural.bridge.eg_1.Color;
import uml.structural.bridge.eg_1.GreenColor;
import uml.structural.bridge.eg_1.MiddleBrush;
import uml.structural.bridge.eg_1.MiniBrush;
import uml.structural.bridge.eg_1.RedColor;

/**
 * on 2023/6/10 13:06
 */
public class Client{
	public static void main(String[] args){
//		颜色对象
		Color red=new RedColor();
		Color black=new BlackColor();
		Color green=new GreenColor();
//		毛笔型号对象
		Brush miniBrush=new MiniBrush(red);
		Brush middleBrush=new MiddleBrush(red);
		Brush bigBrush=new BigBrush(red);
//		写字
		miniBrush.write("hello world!");
		middleBrush.write("hello world!");
		bigBrush.write("hello world!");
//		设置颜色
		miniBrush.setColor(black);
		middleBrush.setColor(black);
		bigBrush.setColor(black);
		
		miniBrush.write("hello world!");
		middleBrush.write("hello world!");
		bigBrush.write("hello world!");
		
		miniBrush.setColor(green);
		middleBrush.setColor(green);
		bigBrush.setColor(green);
		
		miniBrush.write("hello world!");
		middleBrush.write("hello world!");
		bigBrush.write("hello world!");
	}
}
